package com.bacon.service.impl;

import com.bacon.dao.IAccountDao;
import com.bacon.domain.Account;
import com.bacon.service.AccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author bacon
 * @create 2020-06-22-14:22
 */
@Service("accontService")
public class AccountServiceImpl implements AccountService {

    @Autowired
    private IAccountDao accountDao;

    @Override
    public void saveAccouont(Account account) {
        System.out.println("业务层：保存账户");
        accountDao.saveAccouont(account);

    }

    @Override
    public List<Account> findAll() {
        System.out.println("业务层：查询所有账户");
        return accountDao.findAll();
    }
}
